package com.ruoyi.system.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * OJ代码提交对象 oj_submission
 * 
 * @author ruoyi
 * @date 2025-01-21
 */
public class OjSubmission extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 提交ID */
    private String submissionId;

    /** 用户ID */
    @Excel(name = "用户ID")
    private String userId;

    /** 题目ID */
    @Excel(name = "题目ID")
    private String problemId;

    /** 代码内容 */
    @Excel(name = "代码内容")
    private String code;

    /** 编程语言 */
    @Excel(name = "编程语言")
    private String language;

    /** 提交状态 */
    @Excel(name = "提交状态")
    private String status;

    /** 执行时间(ms) */
    @Excel(name = "执行时间(ms)")
    private Integer executionTime;

    /** 内存使用(MB) */
    @Excel(name = "内存使用(MB)")
    private BigDecimal memoryUsage;

    /** 测试用例通过数 */
    @Excel(name = "测试用例通过数")
    private Integer testCasesPassed;

    /** 总测试用例数 */
    @Excel(name = "总测试用例数")
    private Integer totalTestCases;

    /** 得分 */
    @Excel(name = "得分")
    private BigDecimal score;

    /** 编译错误信息 */
    @Excel(name = "编译错误信息")
    private String compileError;

    /** 运行时错误信息 */
    @Excel(name = "运行时错误信息")
    private String runtimeError;

    /** 提交类型 */
    @Excel(name = "提交类型")
    private String submissionType;

    /** 是否开启O2优化 */
    @Excel(name = "是否开启O2优化")
    private String enableO2;

    /** 提交时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "提交时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date submissionTime;

    /** 评测完成时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "评测完成时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date judgedTime;

    public void setSubmissionId(String submissionId) 
    {
        this.submissionId = submissionId;
    }

    public String getSubmissionId() 
    {
        return submissionId;
    }

    public void setUserId(String userId) 
    {
        this.userId = userId;
    }

    public String getUserId() 
    {
        return userId;
    }

    public void setProblemId(String problemId) 
    {
        this.problemId = problemId;
    }

    public String getProblemId() 
    {
        return problemId;
    }

    public void setCode(String code) 
    {
        this.code = code;
    }

    public String getCode() 
    {
        return code;
    }

    public void setLanguage(String language) 
    {
        this.language = language;
    }

    public String getLanguage() 
    {
        return language;
    }

    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }

    public void setExecutionTime(Integer executionTime) 
    {
        this.executionTime = executionTime;
    }

    public Integer getExecutionTime() 
    {
        return executionTime;
    }

    public void setMemoryUsage(BigDecimal memoryUsage) 
    {
        this.memoryUsage = memoryUsage;
    }

    public BigDecimal getMemoryUsage() 
    {
        return memoryUsage;
    }

    public void setTestCasesPassed(Integer testCasesPassed) 
    {
        this.testCasesPassed = testCasesPassed;
    }

    public Integer getTestCasesPassed() 
    {
        return testCasesPassed;
    }

    public void setTotalTestCases(Integer totalTestCases) 
    {
        this.totalTestCases = totalTestCases;
    }

    public Integer getTotalTestCases() 
    {
        return totalTestCases;
    }

    public void setScore(BigDecimal score) 
    {
        this.score = score;
    }

    public BigDecimal getScore() 
    {
        return score;
    }

    public void setCompileError(String compileError) 
    {
        this.compileError = compileError;
    }

    public String getCompileError() 
    {
        return compileError;
    }

    public void setRuntimeError(String runtimeError) 
    {
        this.runtimeError = runtimeError;
    }

    public String getRuntimeError() 
    {
        return runtimeError;
    }

    public void setSubmissionType(String submissionType) 
    {
        this.submissionType = submissionType;
    }

    public String getSubmissionType() 
    {
        return submissionType;
    }

    public void setEnableO2(String enableO2) 
    {
        this.enableO2 = enableO2;
    }

    public String getEnableO2() 
    {
        return enableO2;
    }

    public void setSubmissionTime(Date submissionTime) 
    {
        this.submissionTime = submissionTime;
    }

    public Date getSubmissionTime() 
    {
        return submissionTime;
    }

    public void setJudgedTime(Date judgedTime) 
    {
        this.judgedTime = judgedTime;
    }

    public Date getJudgedTime() 
    {
        return judgedTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("submissionId", getSubmissionId())
            .append("userId", getUserId())
            .append("problemId", getProblemId())
            .append("code", getCode())
            .append("language", getLanguage())
            .append("status", getStatus())
            .append("executionTime", getExecutionTime())
            .append("memoryUsage", getMemoryUsage())
            .append("testCasesPassed", getTestCasesPassed())
            .append("totalTestCases", getTotalTestCases())
            .append("score", getScore())
            .append("compileError", getCompileError())
            .append("runtimeError", getRuntimeError())
            .append("submissionType", getSubmissionType())
            .append("enableO2", getEnableO2())
            .append("submissionTime", getSubmissionTime())
            .append("judgedTime", getJudgedTime())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
} 